package com.xh.easyretry.common;


import com.xh.easyretry.annotations.TimeAvoidance;

public class XHTimeAvoidanceContext {

    private final TimeAvoidance timeAvoidance;
    private final Double multiplier;
    private final Long initInterval;
    private Long interval;
    private final Long maxInterval;

    public XHTimeAvoidanceContext(TimeAvoidance timeAvoidance, Double multiplier, Long initInterval, Long interval, Long maxInterval) {
        this.timeAvoidance = timeAvoidance;
        this.multiplier = multiplier;
        this.initInterval = initInterval;
        this.interval = interval;
        this.maxInterval = maxInterval;
    }

    public TimeAvoidance getTimeAvoidance() {
        return timeAvoidance;
    }

    public Double getMultiplier() {
        return multiplier;
    }

    public Long getInitInterval() {
        return initInterval;
    }

    public Long getInterval() {
        return interval;
    }

    public void setInterval(Long interval) {
        this.interval = interval;
    }

    public Long getMaxInterval() {
        return maxInterval;
    }

    @Override
    public String toString() {
        return "XHTimeAvoidanceContext{" +
                "timeAvoidance=" + timeAvoidance +
                ", multiplier=" + multiplier +
                ", initInterval=" + initInterval +
                ", interval=" + interval +
                ", maxInterval=" + maxInterval +
                '}';
    }
}
